/*
 * @lc app=leetcode.cn id=231 lang=rust
 *
 * [231] 2 的幂
 */

// @lc code=start
impl Solution {
    pub fn is_power_of_two(n: i32) -> bool {
        if(n <= 0) {return false;}
        if(n.count_ones() > 1) {
            return false;
        }
        else {
            return true;
        }
    }
}
// @lc code=end

